﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LeafHttp
{
    /// <summary>
    /// Http请求接口
    /// </summary>
    public interface IHttpRequest
    {
        /// <summary>
        /// 执行请求
        /// </summary>
        /// <returns></returns>
        ExecuteResult Execute();

        /// <summary>
        /// 异步执行请求
        /// </summary>
        /// <param name="responseFunc">收到响应的回调方法</param>
        /// <param name="errorFunc">请求出错的回调方法</param>
        void ExecuteAsync(Action<ResponseResult> responseFunc, Action<ErrorResult> errorFunc = null);
    }
}
